package com.jeesite.modules.stock.dao;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.jeesite.modules.stock.dao.mapper.SectorsMapper;
import com.jeesite.modules.stock.entity.SectorsEntity;

@Component
public class SectorsDao {
	
	@Autowired
	private SectorsMapper sectorsMapper;
	
	public SectorsEntity findDataBySectorName(String sectorName) {
		SectorsEntity entity = new SectorsEntity();
		entity.setSectorName(sectorName);
		List<SectorsEntity> list = sectorsMapper.findList(entity);
		if(list!=null && !list.isEmpty()) {
			return list.get(0);
		}
		return null;
	}

}
